SM64 Segment 02 1 2 »
Users browsing this thread: shygoo

Edit | Delete | Reply | Report | Link
I spent a little time decoding the entire Segment 02 which contains the font textures (HUD, dialog, credits), transition textures, font tables, dialog text, level names, and act names.  I added my documentation to the wiki and am included the notes here. I am also attaching my assembly file which is a complete deconstruction of this segment and can be used to regenerate the exact segment 2 binary using the bass assembler.

Start End Description
0x00000 0x049FF Large font and HUD textures
0x04A00 0x058FF Credits font textures
0x05900 0x06FFF Small dialog font textures
0x07000 0x076FF HUD camera textures
0x07700 0x077E7 HUD lookup table
0x077E8 0x07BE7 Small dialog font lookup table
0x07BE8 0x07C7B Credits font lookup table
0x07C7C 0x07C93 HUD camera lookup table
0x07C94 0x07D07 Some unused dialog-encoded text
0x07D08 0x07D33 Unused text lookup table
0x07D34 0x0FFC7 Dialog text
0x0FFC8 0x10D13 Dialog lookup table
0x10D14 0x10F67 Level names text
0x10F68 0x10FD3 Level names lookup table
0x10FD4 0x1192B Act names text
0x1192C 0x11ABF Act names lookup table
0x11AC0 0x120B7 F3D display lists and vertices
0x120B8 0x172B7 Shadow, transition, other textures

0x172B8 0x172CF Unused. Looks like lighting parameters
0x172D0 0x178BF Matrices, F3D display lists, vertices
0x178C0 0x18A0D Paintings mesh vertices, triangles

Interesting Things
There are a few interesting things I found in segment 02.

In addition to the dialog, level names, and act names, there is an unused section encoded in a similar manner starting at offset 0x7C94. Decoding it reveals something like the listing below. The hex values don't line up to any characters in the (U) ROM dialog lookup table, but they may be remnants from the (J) ROM. I may try to decode these later to see if it reveals anything interesting about the stages available in the stage select..
db "STAGE SELECT\n"
db " \", 0xF0, "\", 0x48, 0x68, "?\n"
db " 1 ", 0x8E, 0x72, 0x9D, 0x82, 0x9D, "\n"
db " 2 ", 0x8B, 0xD5, 0x71, 0x70, "-", 0xF0, 0x89, 0xF0, 0x8B, 0x98, "\n"
db " 3 ", 0x7C, 0x88, "-", 0x7C, 0x96, 0x71, 0xF0, 0x7F, "-\n"
db " 4 ", 0x72, 0xD8, "-", 0x7F, "-", 0x96, 0x9D, 0xF0, 0x83, "\n"
db "   ", 0x77, "_", 0xF1, 0x89, "1", 0xF0, 0x49, 0x42, "\n"
db " ", 0x62, 0xF0, ">", 0x68, 0xFF
db "PAUSE    \n"
db " \", 0xF0, "\", 0x48, 0x68, "?\n"
db " ", 0x63, 0x61, 0x68, " ?", 0xFF


There is a peculiar up arrow texture stored at offset 0x17698, right in the middle of some F3D display lists. I don't recall seeing it in the game. It is the first arrow listed in the picture below. The other font textures that look like arrows are listed for reference as well.
[Image: HaPGZ0M.png]

The ambient and diffuse lighting parameters for the paintings are stored at offsets 0x177B8 and 0x177C0 respectively. You can use this to change how the paintings are rendered while animating. Here, I made the diffuse color red instead of white.
[Image: bSPmWLT.png]

The vertex and triangle data used to construct the animated painting triangle mesh is stored at offset 0x178C0 (0x81AA16 extended ROM) and takes the following format. The Z values of the vertices don't matter as they are controlled by code, but the X and Y can be adjusted for some interesting results. I tried changing the order of the last triangle table, but it just locked up the game when I touched a painting, so it means something.
178C0-178C1: u16 vertex count (0x009D=157)
178C2-17C6F: i16 x, y, z vertices (157*6 bytes)
17C70-17C71: u16 triangle count (0x0108=264)
17C72-182A1: u16 3x triangle indexes (264*6 bytes)
182A2-18A0D: triangle indexes

[Image: E06Ma4k.png]
As a test, I compressed the top and bottom triangles and expanded the middle ones as shown. Looks pretty bad in game:
[Image: hdOUVlQ.png] [Image: pPCBWHD.gif]
(This post was last modified: June 23rd, 2017, 03:10 pm by queueRAM. Edit Reason: wiki links )


Attached Files
Size: 118.37 KB / Downloads: 76 .txt   segment02.txt


Edit | Delete | Reply | Report | Link
You can see the old "STAGE SELECT" menu briefly in this old video of the SM64 beta: https://www.youtube.com/watch?v=ys723F9wiwU&feature=youtu.be&t=378

Edit | Delete | Reply | Report | Link
(October 24th, 2016, 07:25 pm)shygoo Wrote: You can see the old "STAGE SELECT" menu briefly in this old video of the SM64 beta: https://www.youtube.com/watch?v=ys723F9wiwU&feature=youtu.be&t=378

Thanks shygoo, that is exactly the text I'm seeing here! Strange that it was kept in the (U) ROM where none of the Japanese dialog characters are. I dug into the (J) ROM and found the same messages at offset 0x87E4 and 0x883C.
Edit: coerced SM64 (J) to render these better
[Image: GhNIOG5.png]

STAGE SELECT
つづける?
1 マウンテン
2 ファイアーバブル
3 スノースライダー
4 ウォーターランド
クッパ1ごう
もどる

PAUSE
つづける?
やめる?

Translations (thanks to Rena, jrra, and Fendoroid):
STAGE SELECT
Continue?
1 Mountain
2 Fire bubble
3 Snow slide
4 Water land
Bowser number 1
Back

PAUSE
Continue?
Quit?
(This post was last modified: October 25th, 2016, 09:39 am by queueRAM. Edit Reason: screenshots )

Edit | Restore | Reply | Report | Link
This isnt really related, however, there is left over background data from the secret slide of the Big boo's Haunt background. Maybe the slide was going to be differently themed. The bowser door also had a different fanfare, i believe it was somewhere in the game, I heard it years ago, but, it may just be bad memories.

Edit | Delete | Reply | Report | Link
I think that a better translation of「クッパ1ごう」could be "Bowser number 1".
1ごう (1 gou) means "number 1"

Edit | Delete | Reply | Report | Link
(October 25th, 2016, 06:30 am)supermariosan100 Wrote: This isnt really related, however, there is left over background data from the secret slide of the Big boo's Haunt background. Maybe the slide was going to be differently themed. The bowser door also had a different fanfare, i believe it was somewhere in the game, I heard it years ago, but, it may just be bad memories.


I'm not exactly sure what you're trying to say, but it doesn't seem to be related to segment 02.


(October 25th, 2016, 06:58 am)Fendoroid Wrote:
I think that a better translation of「クッパ1ごう」could be "Bowser number 1".
1ごう (1 gou) means "number 1"


Thanks Fendoroid! This makes sense to me. I update the translation above.

Edit | Delete | Reply | Report | Link
Hm... is it possible to use the credits fonts for, I dunno, cutscenes or somethin'?

Edit | Delete | Reply | Report | Link
(October 25th, 2016, 02:38 pm)MrPr1993 Wrote: Hm... is it possible to use the credits fonts for, I dunno, cutscenes or somethin'?


It's certainly possible, but I haven't done any testing. The function PutMiniString/802D82D4(A0=X?, A1=Y?, A2=pointer to string) uses this lookup table and the strings are stored as ASCII in ROM around 0xF0BA0.

The other thing is that the credits font have a black instead of transparent background, so depending what you're going for, it may not look good in a cutscene without changing it.

Edit | Delete | Reply | Report | Link
(October 26th, 2016, 06:29 pm)queueRAM Wrote:
(October 25th, 2016, 02:38 pm)MrPr1993 Wrote:
Hm... is it possible to use the credits fonts for, I dunno, cutscenes or somethin'?


It's certainly possible, but I haven't done any testing. The function PutMiniString/802D82D4(A0=X?, A1=Y?, A2=pointer to string) uses this lookup table and the strings are stored as ASCII in ROM around 0xF0BA0.

The other thing is that the credits font have a black instead of transparent background, so depending what you're going for, it may not look good in a cutscene without changing it.


Fascinating... someone should test it with this type of font anyways before changing it! Could be useful for cutscenes and new intros/endings.
(This post was last modified: October 26th, 2016, 06:37 pm by MrPr1993.)

Edit | Restore | Reply | Report | Link
Regarding the unused stage select, I attempted to carry the font over to the NTSC version a while ago but never got around to about posting it.
It's slightly broken and needs a few more tweaks. And as for the Japanese characters, I could replace them over the rest of the capitals, lower case letters and symbols.

SM64 Segment 02 1 2 »
Users browsing this thread: shygoo

Quick Reply




Inline Post Moderation:  

Moderation Options:


Loading...
  EN ・日本語 
Expand chat